package com.jy.event.dao;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;

import java.util.List;
import java.util.Map;

/**
 * Created by lihu on 2017/12/15.
 */
public class ProductDaoImpl {

    @Autowired
    JdbcTemplate jdbcTemplate;

    public List<Map<String, Object>> updateOrAddProductAll() {
        String sql = "select id,store_id,`name`,product_status,enabled is_enabled from product ";
        return jdbcTemplate.queryForList(sql);
    }


    public List<Map<String, Object>> updateOrAddProduct() {
        String sql = "select id,store_id,`name`,product_status,enabled is_enabled from product ";
        return jdbcTemplate.queryForList(sql);
    }
}
